package riven.controller;

import java.io.Serializable;

/**
 * @author 陈浩
 * @date 2021/12/9
 */
public class Student implements Serializable {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static Student of(int age, String name) {
        Student student = new Student();
        student.setAge(age);
        student.setName(name);
        return student;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
